import React from 'react';
import { Text, View, TouchableOpacity, StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  user: {
    position: 'absolute',
    left: 10,
    top: 10,
    backgroundColor: 'khaki',
    borderRadius: 10,
    borderStyle: 'solid',
    borderWidth: 2,
    borderColor: 'lightcoral',
  },
  userName: {
    fontSize: 20,
    width: 100,
    // height: 40,
    padding: 10,
    textAlign: 'center',
  },
});

export default function User(props) {
  return (
    <View style={styles.user}>
      <TouchableOpacity onPressIn={props.setIsShowBox}>
        <Text style={styles.userName}>{props.userName}</Text>
      </TouchableOpacity>
    </View>
  );
}
